package com.caigou.service.impl;

import com.caigou.bean.cms.entity.SurveyPermission;
import com.caigou.mapper.cms.SurveyPermissionMapper;
import com.caigou.service.SurveyPermissionService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class SurveyPermissionServiceImpl implements SurveyPermissionService {

    @Resource
    private SurveyPermissionMapper surveyPrivilegeMapper;

    @Override
    public int loadSurveyPermission(String catalogId, String formId, String userId, String deviceId) {
        return surveyPrivilegeMapper.loadSurveyPermission(catalogId,formId,userId,deviceId);
    }

    @Override
    public int saveSurveyPermission(SurveyPermission permission) {
        return surveyPrivilegeMapper.saveSurveyPermission(permission);
    }

    @Override
    public int deletePermissionByCatalog(String catalogId) {
        return surveyPrivilegeMapper.deletePermissionByCatalog(catalogId);
    }

    @Override
    public int deletePermissionByForm(String formId) {
        return surveyPrivilegeMapper.deletePermissionByForm(formId);
    }
}
